package com.aspose.cells.a.d;

import com.aspose.cells.Color;

public class zco extends zck {
   private zca b;

   public zco(zcb var1) {
      super(var1);
      this.b = new zca(var1);
   }

   public void a(com.aspose.cells.b.a.b.zo var1, String var2) throws Exception {
      this.b(var1, var2);
   }

   public void a(com.aspose.cells.b.a.b.zo var1, Color var2) throws Exception {
      this.b.a(var1, this.f());
   }

   public void a(com.aspose.cells.b.a.b.zo var1) throws Exception {
      float var2 = this.f();
      this.b.a(new com.aspose.cells.b.a.b.zo[]{this.c(), var1}, var2);
   }

   public void a(com.aspose.cells.b.a.b.zq var1) throws Exception {
      this.d(var1);
   }

   public void b(com.aspose.cells.b.a.b.zq var1) throws Exception {
      this.d(var1);
   }

   public void a(com.aspose.cells.b.a.b.zo[] var1) throws Exception {
      this.b.a(var1, this.f());
   }

   public void b(com.aspose.cells.b.a.b.zo[] var1) throws Exception {
      this.b.a(var1, this.f());
   }

   public void a(com.aspose.cells.b.a.b.zo[][] var1) throws Exception {
      this.b.a(var1, this.f());
   }

   public void a(com.aspose.cells.b.a.b.zq var1, com.aspose.cells.b.a.b.zo var2, com.aspose.cells.b.a.b.zo var3) throws Exception {
      this.d(var1, var2, var3);
   }

   public void c(com.aspose.cells.b.a.b.zq var1) throws Exception {
      this.d(var1);
   }

   public void b(com.aspose.cells.b.a.b.zq var1, com.aspose.cells.b.a.b.zo var2, com.aspose.cells.b.a.b.zo var3) throws Exception {
      this.d(var1, var2, var3);
   }

   public void c(com.aspose.cells.b.a.b.zq var1, com.aspose.cells.b.a.b.zo var2, com.aspose.cells.b.a.b.zo var3) throws Exception {
      this.d(var1, var2, var3);
   }

   public void a(com.aspose.cells.b.a.b.zq var1, com.aspose.cells.b.a.b.zt var2) throws Exception {
      this.d(var1);
   }

   public void a(com.aspose.cells.b.a.b.zq var1, com.aspose.cells.b.a.b.zq var2, byte[] var3) throws Exception {
      this.d(var2);
   }

   private void b(com.aspose.cells.b.a.b.zo var1, String var2) throws Exception {
      com.aspose.cells.b.a.b.zq var3 = new com.aspose.cells.b.a.b.zq(var1, zav.b(var2, this.a().e()));
      var3.c(var3.h() + (float)(this.a().l() * var2.length()));
      com.aspose.cells.b.a.b.zo[] var4 = new com.aspose.cells.b.a.b.zo[]{var1};
      com.aspose.cells.b.a.b.a.zi var5 = this.a().a(var4, var3.e(), this.a().e());
      var1 = var4[0];
      var3.a(var1);
      com.aspose.cells.b.a.b.zo[] var6 = new com.aspose.cells.b.a.b.zo[]{new com.aspose.cells.b.a.b.zo(var3.f(), var3.g()), new com.aspose.cells.b.a.b.zo(var3.f() + var3.h(), var3.g()), new com.aspose.cells.b.a.b.zo(var3.f(), var3.g() + var3.i()), new com.aspose.cells.b.a.b.zo(var3.f() + var3.h(), var3.g() + var3.i())};
      var5.a(var6);
      this.b.b(var6, 0.0F);
   }

   private void d(com.aspose.cells.b.a.b.zq var1) throws Exception {
      float var2 = this.f();
      this.b.a(new com.aspose.cells.b.a.b.zo[]{new com.aspose.cells.b.a.b.zo(var1.f(), var1.g()), new com.aspose.cells.b.a.b.zo(var1.f() + var1.h(), var1.g() + var1.i())}, var2);
   }

   private void d(com.aspose.cells.b.a.b.zq var1, com.aspose.cells.b.a.b.zo var2, com.aspose.cells.b.a.b.zo var3) throws Exception {
      float var4 = this.f();
      this.b.a(new com.aspose.cells.b.a.b.zo[]{var2, var3}, var4);
      com.aspose.cells.b.a.b.zo var5 = new com.aspose.cells.b.a.b.zo(var1.f(), var1.g());
      com.aspose.cells.b.a.b.zo var6 = new com.aspose.cells.b.a.b.zo(var1.f() + var1.h(), var1.g() + var1.i());
      com.aspose.cells.b.a.b.zo var7 = new com.aspose.cells.b.a.b.zo((var5.d() + var6.d()) / 2.0F, (var5.e() + var6.e()) / 2.0F);
      var2.a(var2.d() - var7.d());
      var2.b(var2.e() - var7.e());
      var3.a(var3.d() - var7.d());
      var3.b(var3.e() - var7.e());
      int var8 = c(var2);
      int var9 = c(var3);
      switch(var8) {
      case 1:
         switch(var9) {
         case 1:
            if (var3.d() >= var2.d() || var3.e() >= var2.e()) {
               this.b.a(new com.aspose.cells.b.a.b.zo(var6.d(), var7.e()), var4);
               this.b.a(new com.aspose.cells.b.a.b.zo(var7.d(), var6.e()), var4);
               this.b.a(new com.aspose.cells.b.a.b.zo(var5.d(), var7.e()), var4);
               this.b.a(new com.aspose.cells.b.a.b.zo(var7.d(), var5.e()), var4);
            }

            return;
         case 2:
            this.b.a(new com.aspose.cells.b.a.b.zo(var7.d(), var5.e()), var4);
            return;
         case 3:
            this.b.a(new com.aspose.cells.b.a.b.zo(var5.d(), var7.e()), var4);
            this.b.a(new com.aspose.cells.b.a.b.zo(var7.d(), var5.e()), var4);
            return;
         case 4:
            this.b.a(new com.aspose.cells.b.a.b.zo(var7.d(), var6.e()), var4);
            this.b.a(new com.aspose.cells.b.a.b.zo(var5.d(), var7.e()), var4);
            this.b.a(new com.aspose.cells.b.a.b.zo(var7.d(), var5.e()), var4);
            return;
         default:
            throw new IllegalStateException("Unknown quarter.");
         }
      case 2:
         switch(var9) {
         case 1:
            this.b.a(new com.aspose.cells.b.a.b.zo(var6.d(), var7.e()), var4);
            this.b.a(new com.aspose.cells.b.a.b.zo(var7.d(), var6.e()), var4);
            this.b.a(new com.aspose.cells.b.a.b.zo(var5.d(), var7.e()), var4);
            return;
         case 2:
            if (var3.d() >= var2.d() || var3.e() <= var2.e()) {
               this.b.a(new com.aspose.cells.b.a.b.zo(var7.d(), var5.e()), var4);
               this.b.a(new com.aspose.cells.b.a.b.zo(var6.d(), var7.e()), var4);
               this.b.a(new com.aspose.cells.b.a.b.zo(var7.d(), var6.e()), var4);
               this.b.a(new com.aspose.cells.b.a.b.zo(var5.d(), var7.e()), var4);
            }

            return;
         case 3:
            this.b.a(new com.aspose.cells.b.a.b.zo(var5.d(), var7.e()), var4);
            return;
         case 4:
            this.b.a(new com.aspose.cells.b.a.b.zo(var7.d(), var6.e()), var4);
            this.b.a(new com.aspose.cells.b.a.b.zo(var5.d(), var7.e()), var4);
            return;
         default:
            throw new IllegalStateException("Unknown quarter.");
         }
      case 3:
         switch(var9) {
         case 1:
            this.b.a(new com.aspose.cells.b.a.b.zo(var6.d(), var7.e()), var4);
            this.b.a(new com.aspose.cells.b.a.b.zo(var7.d(), var6.e()), var4);
            return;
         case 2:
            this.b.a(new com.aspose.cells.b.a.b.zo(var7.d(), var5.e()), var4);
            this.b.a(new com.aspose.cells.b.a.b.zo(var6.d(), var7.e()), var4);
            this.b.a(new com.aspose.cells.b.a.b.zo(var7.d(), var6.e()), var4);
            return;
         case 3:
            if (var3.d() <= var2.d() || var3.e() <= var2.e()) {
               this.b.a(new com.aspose.cells.b.a.b.zo(var5.d(), var7.e()), var4);
               this.b.a(new com.aspose.cells.b.a.b.zo(var7.d(), var5.e()), var4);
               this.b.a(new com.aspose.cells.b.a.b.zo(var6.d(), var7.e()), var4);
               this.b.a(new com.aspose.cells.b.a.b.zo(var7.d(), var6.e()), var4);
            }

            return;
         case 4:
            this.b.a(new com.aspose.cells.b.a.b.zo(var7.d(), var6.e()), var4);
            return;
         default:
            throw new IllegalStateException("Unknown quarter.");
         }
      case 4:
         switch(var9) {
         case 1:
            this.b.a(new com.aspose.cells.b.a.b.zo(var6.d(), var7.e()), var4);
            return;
         case 2:
            this.b.a(new com.aspose.cells.b.a.b.zo(var7.d(), var5.e()), var4);
            this.b.a(new com.aspose.cells.b.a.b.zo(var6.d(), var7.e()), var4);
            return;
         case 3:
            this.b.a(new com.aspose.cells.b.a.b.zo(var5.d(), var7.e()), var4);
            this.b.a(new com.aspose.cells.b.a.b.zo(var7.d(), var5.e()), var4);
            this.b.a(new com.aspose.cells.b.a.b.zo(var6.d(), var7.e()), var4);
            return;
         case 4:
            if (var3.d() <= var2.d() || var3.e() >= var2.e()) {
               this.b.a(new com.aspose.cells.b.a.b.zo(var7.d(), var6.e()), var4);
               this.b.a(new com.aspose.cells.b.a.b.zo(var5.d(), var7.e()), var4);
               this.b.a(new com.aspose.cells.b.a.b.zo(var7.d(), var5.e()), var4);
               this.b.a(new com.aspose.cells.b.a.b.zo(var6.d(), var7.e()), var4);
            }

            return;
         default:
            throw new IllegalStateException("Unknown quarter.");
         }
      default:
         throw new IllegalStateException("Unknown quarter.");
      }
   }

   private static int c(com.aspose.cells.b.a.b.zo var0) {
      if (var0.d() > 0.0F && var0.e() >= 0.0F) {
         return 1;
      } else if (var0.d() <= 0.0F && var0.e() > 0.0F) {
         return 2;
      } else {
         return var0.d() < 0.0F && var0.e() <= 0.0F ? 3 : 4;
      }
   }

   private float f() throws Exception {
      return this.a().c() != null ? this.a().c().p() / 2.0F : 0.0F;
   }

   public zca e() {
      return this.b;
   }
}
